package com.zwh.modbus.modbus4j;

import java.util.List;

import com.alibaba.fastjson.JSONObject;
import com.zwh.modbus.modbus4j.param.TConnectDevice;
import com.zwh.modbus.modbus4j.param.TConnectDevicePoint;

/**
 * @Author ody
 * @Description //TODO 设备侧消息协议
 * @Date 2023/6/28 14:13
 **/
public interface DeviceProtocolService {

    TConnectDevice getDeviceInfo();
    /**
      * @Author ody
      * @Description //TODO 获取一个或者全部测点信息
      * @Date 2023/7/24 10:25
      * @Param [attributeName]
      * @return java.util.List<com.htgx.baop.device.api.entity.TConnectDevicePoint>
     **/
    List<TConnectDevicePoint> getDevicePointsInfo(String attributeName);

    void init() throws Exception;

    boolean isConnect(String deviceId);

    JSONObject read(Object var);

    void write(TConnectDevicePoint point, Object value) throws Exception;

    void cancel();

    void distroy();
}
